var getInfo = window.location.search.slice(window.location.search.lastIndexOf("?") + 1);
console.log(getInfo)
Ajax({
    url: 'http://localhost:3000/artists',
    params: {
        id: getInfo,
    },
    type: 'get',
}).then(function (res) {
//    console.log(res)
   const data = Array.from(res.hotSongs);
   const songLis = document.querySelector('.songLists');
   const gName = document.querySelector('.g-name');
   let top =template('top', {
       data: res.artist,
   })
   gName.innerHTML = top;
   let tpl = template('tpl', {
       data: data,
   });
   songLis.innerHTML = tpl;
   const reName = document.querySelectorAll('.reName');
//    console.log(reName)
   reName.forEach(function(item,index) {
       item.innerHTML = `${res.artist.name}`;
   })
//    reName.innerHTML

//    data.artist.name
// hotSongs遍历
// id name picUrl
})